<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <title>剪贴</title>
  <link href="../Styles/styles.css" rel="stylesheet" type="text/css"/>
</head>

<body>
  <h2 id="clips">剪贴</h2>

  <p class="h2subheading">— 保存文字和样式 —</p>

  <p>Clips allow you to save snippets of text and paste them into your document at any time. They can also be used to insert HTML style tags around your text. You can create clips using the Clip Editor, use the Clips window to quickly select a clip, use a Clip Bar toolbar to select a clip using a button, or use keyboard shortcuts to access the clips. And you can even automatically fill the Clips list from your CSS stylesheet styles.</p>
  <p>剪辑使您可以保存文本片段，并随时将其粘贴到文档中。它们还可以用于在文本周围插入 HTML 样式标签。您可以使用“剪辑编辑器”创建剪辑，使用“剪辑”窗口快速选择一个剪辑，使用“剪辑栏”工具栏使用一个按钮选择一个剪辑，或者使用键盘快捷方式访问这些剪辑。您甚至可以自动从 CSS 样式表样式填充“剪辑”列表。</p>

  <h3 class="sigil_not_in_toc">剪辑编辑器</h3>

  <p>To open the Clip Editor, select the menu item <span class="menuitem">Tools→Clip Editor</span> or its keyboard shortcut:</p>
  <p>要打开剪辑编辑器，请选择菜单项 <span class="menuitem">工具→剪辑编辑器</span> 或其键盘快捷键：</p>

  <div class="image">
    <img alt="clip-editor-main" src="../Images/clip-editor-main.png"/>
  </div>

  <h4 class="sigil_not_in_toc">上下文菜单</h4>

  <p>Most actions concerning editing clips are accessed using the right-click context menu:</p>
  <p>可以使用右键单击上下文菜单访问与剪辑有关的大多数操作：</p>

  <div class="image">
    <img alt="clip-editor-context-menu" src="../Images/clip-editor-context-menu.png"/>
  </div>

  <p>Select one or more entries then right-click on the selection for the following options:</p>
  <p>选择一个或多个条目，然后右键单击所选内容以选择以下选项：</p>

  <ul>
    <li><span class="listheading">Add Entry:</span> Add a blank search under the entry you clicked.</li>
    <li><span class="listheading">添加条目：</span>在您单击的条目下添加空白搜索。</li>

    <li><span class="listheading">Add Group:</span> Add a new group under the entry you clicked.</li>
    <li><span class="listheading">添加组：</span>在您单击的条目下添加一个新组。</li>

    <li class="first"><span class="listheading">Edit:</span> Edit the entry.</li>
    <li class="first"><span class="listheading">编辑：</span>编辑条目。</li>

    <li class="first"><span class="listheading">Cut:</span> Delete one or more entries that can be pasted later.</li>
    <li class="first"><span class="listheading">剪切：</span>删除一个或多个以后可以粘贴的条目。</li>

    <li><span class="listheading">Copy:</span> Copy one or more entries that can be pasted later.</li>
    <li><span class="listheading">复制：</span>复制一个或多个以后可以粘贴的条目。</li>

    <li><span class="listheading">Paste:</span> Paste any cut/copied entries.</li>
    <li><span class="listheading">粘贴：</span>粘贴所有剪切/复制的条目。</li>

    <li class="first"><span class="listheading">Delete:</span> Delete entries or groups.</li>
    <li class="first"><span class="listheading">删除：</span>删除条目或组。</li>

    <li class="first"><span class="listheading">Import:</span> Read a list of exported entries from a file into the list.</li>
    <li class="first"><span class="listheading">导入：</span>将文件中已导出条目的列表读入列表。</li>

    <li><span class="listheading">Reload:</span> Restore the list from the last saved state.</li>
    <li><span class="listheading">重新加载：</span>从上次保存的状态恢复列表。</li>

    <li class="first"><span class="listheading">Export:</span> Save selected entries to a file for sharing.</li>
    <li class="first"><span class="listheading">导出：</span>将所选条目保存到文件中以进行共享。</li>

    <li><span class="listheading">Export All:</span> Save all entries to a file.</li>
    <li><span class="listheading">全部导出：</span>将所有条目保存到文件中。</li>

    <li class="first"><span class="listheading">Autofill:</span> Create clips from your CSS stylesheets.</li>
    <li class="first"><span class="listheading">自动填充：</span>从 CSS 样式表创建剪辑。</li>

    <li class="first"><span class="listheading">Collapse All:</span> Collapse the display of all groups.</li>
    <li class="first"><span class="listheading">全部折叠：</span>折叠所有组的显示。</li>

    <li><span class="listheading">Expand All:</span> Expand the display of all groups.</li>
    <li><span class="listheading">全部展开：</span>展开所有组的显示。</li>
  </ul>

  <p>You can also use the <span class="buttonbox">Add Entry</span> or <span class="buttonbox">Add Group</span> buttons to add new items.</p>
  <p>您还可以使用 <span class="buttonbox">添加条目</span> 或 <span class="buttonbox>添加组</span> 按钮来添加新项目。</p>

  <h4 class="sigil_not_in_toc">保存</h4>

  <p>To save your entries to disk, click <span class="buttonbox">保存</span>.</p>

  <p>To exit without saving your entries you can just close the window (with the <span class="buttonbox">Close</span> button or the <span class="shortcut">Esc</span> key) and confirming you don’t want to save if prompted. You can also use the context menu <span class="menuitem">Reload</span> to reload your entries from disk – which will delete your current entries.</p>
  <p>要退出而不保存输入，只需关闭窗口（使用 <span class="buttonbox">关闭</span> 按钮或 <span class="shortcut">Esc</span> 键），如果出现提示，则确认不想保存。您还可以使用上下文菜单 <span class="menuitem">重新加载</span> 从磁盘重新加载条目——这将删除当前条目。</p>

  <p>You can use the <span class="menuitem">Export</span> and <span class="menuitem">Import</span> context menu items to save your searches so that they can be shared with others.</p>
  <p>您可以使用 <span class="menuitem">导出</span> 和 <span class="menuitem">导入</span> 上下文菜单项来保存搜索，以便与他人共享。</p>

  <div class="tip">
    <p class="tiptext">If you save and are running more than one copy of Sigil, then the other instances of Sigil will automatically reload the newly saved clips to keep all copies in sync.</p>
    <p class="tiptext">如果您保存并正在运行多个 Sigil 副本，则 Sigil 的其他实例将自动重新加载新保存的剪辑，以使所有副本保持同步。</p>
  </div>

  <h4 class="sigil_not_in_toc">过滤</h4>

  <p>You can use the filter text box to restrict the list of clips shown to make it easier to find text.</p>
  <p>您可以使用过滤器文本框来限制显示的剪辑列表，以使查找文本变得更加容易。</p>

  <h4 class="sigil_not_in_toc">移动条目</h4>

  <p>You can move entries or groups around by using the arrow keys or by drag and drop.</p>
  <p>您可以使用箭头键或通过拖放来移动条目或组。</p>

  <p>In order to group entries you must first create a group to put them in.</p>
  <p>为了对条目进行分组，必须首先创建一个组以将其放入。</p>

  <h4 class="sigil_not_in_toc">剪贴</h4>

  <p>Clicking the button <span class="buttonbox">Paste Clip</span> will paste the entry you selected into the last window you selected (your document in Code View, or Find &amp; Replace).</p>
  <p>Clicking the button <span class="buttonbox">剪贴</span> 会将您选择的条目粘贴到您选择的最后一个窗口中（您在“代码视图”中的文档，或 查找 &amp; 替换）。</p>

  <div class="tip">
    <p class="tiptext">You can paste a clip using just the keyboard by using the shortcut to open Clips, typing your clip name in the filter box and hitting return (and then Esc if you want to close the window). But using a keyboard shortcut may be easier.</p>
    <p class="tiptext">您可以使用快捷方式打开“剪辑”，在过滤器框中键入您的剪辑名称，然后按回车键（如果要关闭窗口，则按 Esc 键），而仅使用键盘粘贴剪辑。 但是使用键盘快捷键可能会更容易。</p>
  </div>

  <p>You can also paste a group or selection of clips if necessary.</p>
  <p>如果需要，您也可以粘贴一组剪辑或选择剪辑。</p>

  <p>You can also right-click on your text in Code View to bring up the context menu. You can then select your clip and it will be inserted immediately.</p>
  <p>您也可以在“代码视图”中右键单击文本以调出上下文菜单。 然后，您可以选择您的剪辑，它将立即被插入。</p>

  <h4 class="sigil_not_in_toc">自动填充 CSS 条目</h4>

  <p>The Autofill context menu item will scan your CSS stylesheets and create a clip entry for each simple selector it finds.</p>
  <p>“自动填充”上下文菜单项将扫描您的 CSS 样式表，并为找到的每个简单选择器创建一个剪辑条目。</p>

  <p>For example, if you have the selector or style "p.first" then Autofill will create a clip for it as follows:</p>
  <p>例如，如果您具有选择器或样式为“p.first”，则“自动填充”将为其创建一个剪辑，如下所示：</p>

  <pre class="example">&lt;p class="first"&gt;\1&lt;/p&gt;</pre>

  <p>If the selector is "*.class" then Autofill will create entries for "p.class", "div.class", and "span.class".</p>
  <p>如果选择器为“*.class”，则自动填充将为“p.class”，“div.class”和“span.class”创建条目。</p>

  <p>All new Autofill clips are stored in the "Autofill" group. If the "Autofill" group does not exist it will be created. You can rename the group once it has been created, and you can move or copy any entry to any group.</p>
  <p>所有新的自动填充剪辑都存储在“自动填充”组中。 如果“自动填充”组不存在，将创建该组。创建组后即可对其重命名，也可以将任何条目移动或复制到任何组。</p>

  <h3 class="sigil_not_in_toc">剪辑栏</h3>

  <p>The Clip Bar is an optional toolbar that will show buttons for the first 20 clips that are not in a group. You can display the Clip Bar by selecting the menu <span class="menuitem">View→Toolbars→Clips</span>:</p>
  <p>剪辑栏是一个可选工具栏，将显示不在组中的前 20 个剪辑的按钮。您可以通过选择菜单 <span class=“menuitem”>查看→工具栏→剪辑</span> 来显示剪辑栏：</p>

  <div class="image">
    <img alt="clips-clip-bar" src="../Images/clips-clip-bar.png"/>
  </div>

  <p>The buttons will show the clip’s name, so you may want to keep the names short. You can use them as shortcuts for your own styles or even for common special characters.</p>
  <p>这些按钮将显示剪辑的名称，因此您可能需要使名称简短。您可以将它们用作您自己的样式甚至常见特殊字符的快捷方式。</p>

  <div class="tip">
    <p class="tiptext">Clips can also have keyboard shortcuts – see <span class="menuitem">插入→剪辑</span></p>
  </div>

  <h3 class="sigil_not_in_toc">剪辑窗口</h3>

  <p>The Clips window is a dockable window that shows all your Clips in a list and allows you to click an entry to paste it into your text. You can display the Clips window by selecting the menu <span class="menuitem">View→Clips</span>:</p>
  <p>剪辑窗口是一个可停靠的窗口，该窗口在列表中显示所有剪辑，并允许您单击条目以将其粘贴到文本中。您可以通过选择菜单 <span class="menuitem">查看→剪辑</span> 来显示“剪辑”窗口：</p>

  <div class="image">
    <img alt="clips-clips-window" src="../Images/clips-clips-window.png"/>
  </div>

  <h3 class="sigil_not_in_toc">使用剪辑来格式化文本</h3>

  <p>Clips provide a way to paste text before and after selected text – to give you a basic ability to format your text.</p>
  <p>剪辑提供了一种在所选文本之前和之后粘贴文本的方法 - 使您能够基本格式化文本。</p>

  <p>If you define a clip using "\1" in the text then Clips will treat this as a Regex replacement command. When you paste the clip, the "\1" will be replaced with whatever text was selected.</p>
  <p>如果您在文本中使用“\1”定义剪辑，则剪辑会将其视为正则表达式替换命令。粘贴剪辑时，“\1”将替换为所选的任何文本。</p>

  <p>For example, if your clip is</p>
  <p>例如，如果您的剪辑是</p>

  <pre class="example">&lt;span class="name"&gt;\1&lt;/span&gt;</pre>

  <p>and you select the text</p>
  <p>然后选择文本</p>

  <pre class="example">Hello World</pre>

  <p>Then when you apply the clip the text will be changed to</p>
  <p>然后，当您应用剪辑时，文本将更改为</p>

  <pre class="example">&lt;span class="name"&gt;Hello World&lt;/span&gt;</pre>

  <p>You can use this to build up a library of styles and formatting that can be applied quickly.</p>
  <p>您可以使用它来构建可以快速应用的样式和格式库。</p>

  <p>You can use other regex commands in your clip, although complex regex statements might not work.</p>
  <p>您可以在剪辑中使用其他 regex 命令，尽管复杂的 regex 语句可能不起作用。</p>

  <div class="tip">
    <p class="tiptext">You can use <span class="shortcut">Ctrl+Space</span> to remove formatting tags from selected text before pasting a clip.</p>
    <p class="tiptext">您可以在粘贴剪辑之前使用 <span class="shortcut">Ctrl+Space</span> 从所选文本中删除格式标签。</p>
  </div>
</body>
</html>